STEP 12: Let's now grab a random image label from the list of image labels we created earlier!

random.choice pulls a random item from a list every time it's called.

  • In , drag Random Choice inside your interval event.
  • Change the variable to the left of the = sign from my_var to image.
  • Change the variable inside the parentheses from my_list to image_list.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)